tests: check CoreDNS via pod state instead of host process#5366
Open
Santa0337 wants to merge 2 commits intocanonical:masterfrom
Open
tests: check CoreDNS via pod state instead of host process#5366Santa0337 wants to merge 2 commits intocanonical:masterfrom
Santa0337 wants to merge 2 commits intocanonical:masterfrom
Conversation
Santa0337
commented
Jan 8, 2026
Author
Santa0337
left a comment
There was a problem hiding this comment.
tox -e lint
lint: commands[0]> flake8 --max-line-length=120 --ignore=C901,N801,N802,N803,N806,N816,W503,E203
lint: commands[1]> codespell --ignore-words-list=aks,ccompiler,NotIn --quiet-level=2 '--skip=.patch,.spec,.tox_env,.git,*.nsi'
lint: commands[2]> black --diff --check --exclude '/(.eggs|.git|.tox|.venv|.build|dist|charmhelpers|mod)/' .
All done! ✨ 🍰 ✨
72 files would be left unchanged.
lint: OK (4.21=setup[0.11]+cmd[1.24,0.45,2.40] seconds)
congratulations :) (4.26 seconds)
Santa0337
commented
Jan 22, 2026
Author
There was a problem hiding this comment.
@lazzarello, @ktsakalozos could you make a code review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The stop/start test was checking for a
corednshost process usingpsutil.In modern MicroK8s, CoreDNS runs as a containerized pod and is not visible as a
host process even when DNS is healthy. This caused the test to fail even though
CoreDNS was running correctly.
Changes
for a host-level
corednsprocess.Testing
pytest tests/test-simple.pylocally.microk8s kubectl get pods -n kube-system.Possible Regressions
This change should not introduce regressions. The test now relies on Kubernetes
API state, which is the correct and stable source of truth for CoreDNS health.
Checklist
Notes
This change improves test reliability across environments where CoreDNS runs
inside containerd and is not visible as a host process due to snap confinement.